home *** CD-ROM | disk | FTP | other *** search
/ Languguage OS 2 / Languguage OS II Version 10-94 (Knowledge Media)(1994).ISO / gnu / bash_114.zip / bash-1.14.2 / lib / glob / Makefile < prev    next >
Encoding:
Makefile  |  1994-05-19  |  2.7 KB  |  93 lines

  1. ## -*- text -*- ####################################################
  2. #                                   #
  3. # Makefile for the GNU Glob Library.                   #
  4. #                                   #
  5. ####################################################################
  6.  
  7. # This Makefile is hand made from a template file, found in
  8. # ../template.  Each library must provide several Makefile
  9. # targets: `all', `clean', `documentation', `install', and
  10. # `what-tar'.  The `what-tar' target reports the names of the
  11. # files that need to be included in a tarfile to build the full
  12. # code and documentation for this library.
  13.  
  14. # Please note that the values for INCLUDES, CC, AR, RM, CP,
  15. # RANLIB, and selfdir are passed in from ../Makefile, and do
  16. # not need to be defined here.
  17. srcdir = .
  18. VPATH = .:$(srcdir)
  19.  
  20. # Here is a rule for making .o files from .c files that doesn't force
  21. # the type of the machine (like -sun3) into the flags.
  22. .c.o:
  23.     $(CC) -c $(CFLAGS) $(INCLUDES) $(LOCAL_DEFINES) $(CPPFLAGS) $<
  24.  
  25. # LOCAL_DEFINES are flags that are specific to this library.
  26. # Define -DUSG if you are using a System V operating system.
  27. LOCAL_DEFINES = $(LOCAL_INCLUDES) #-DUSG
  28.  
  29. # For libraries which include headers from other libraries.
  30. LOCAL_INCLUDES = -I..
  31.  
  32. # The name of the library target.
  33. LIBRARY_NAME = libglob.a
  34.  
  35. # The C code source files for this library.
  36. CSOURCES = $(srcdir)glob.c $(srcdir)fnmatch.c
  37.  
  38. # The header files for this library.
  39. HSOURCES = $(srcdir)fnmatch.h
  40.  
  41. OBJECTS = glob.o fnmatch.o
  42.  
  43. # The texinfo files which document this library.
  44. DOCSOURCE = doc/glob.texi
  45. DOCOBJECT = doc/glob.dvi
  46. DOCSUPPORT = doc/Makefile
  47. DOCUMENTATION = $(DOCSOURCE) $(DOCOBJECT) $(DOCSUPPORT)
  48.  
  49. SUPPORT = Makefile ChangeLog $(DOCSUPPORT)
  50.  
  51. SOURCES  = $(CSOURCES) $(HSOURCES) $(DOCSOURCE)
  52.  
  53. THINGS_TO_TAR = $(SOURCES) $(SUPPORT)
  54.  
  55. ######################################################################
  56.  
  57. all: $(LIBRARY_NAME)
  58.  
  59. $(LIBRARY_NAME): $(OBJECTS)
  60.     $(RM) -f $@
  61.     $(AR) cq $@ $(OBJECTS)
  62.     -if [ -f "$(RANLIB)" ]; then $(RANLIB) $@; fi
  63.  
  64. what-tar:
  65.     @for file in $(THINGS_TO_TAR); do \
  66.       echo $(selfdir)$$file; \
  67.     done
  68.  
  69. documentation: force
  70.     -(cd doc; $(MAKE) $(MFLAGS))
  71. force:
  72.  
  73. # The rule for 'includes' is written funny so that the if statement
  74. # always returns TRUE unless there really was an error installing the
  75. # include files.
  76. install:
  77.     -$(MV) $(bindir)/$(LIBRARY_NAME) $(bindir)/$(LIBRARY_NAME)-old
  78.     $(CP) $(LIBRARY_NAME) $(bindir)/$(LIBRARY_NAME)
  79.     if [ -f "$(RANLIB)" ]; then $(RANLIB) -t $(bindir)/$(LIBRARY_NAME); fi
  80.  
  81. clean:
  82.     rm -f $(OBJECTS) $(LIBRARY_NAME)
  83.     -(cd doc; $(MAKE) $(MFLAGS) clean)
  84.  
  85.  
  86. ######################################################################
  87. #                                     #
  88. #  Dependencies for the object files which make up this library.     #
  89. #                                     #
  90. ######################################################################
  91.  
  92. fnmatch.o: fnmatch.c fnmatch.h
  93.